\(\int x (3-4 x+x^2)^2 \, dx\) [2166]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 12, antiderivative size = 34 \[ \int x \left (3-4 x+x^2\right )^2 \, dx=\frac {9 x^2}{2}-8 x^3+\frac {11 x^4}{2}-\frac {8 x^5}{5}+\frac {x^6}{6} \]

[Out]

9/2*x^2-8*x^3+11/2*x^4-8/5*x^5+1/6*x^6

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {645} \[ \int x \left (3-4 x+x^2\right )^2 \, dx=\frac {x^6}{6}-\frac {8 x^5}{5}+\frac {11 x^4}{2}-8 x^3+\frac {9 x^2}{2} \]

[In]

Int[x*(3 - 4*x + x^2)^2,x]

[Out]

(9*x^2)/2 - 8*x^3 + (11*x^4)/2 - (8*x^5)/5 + x^6/6

Rule 645

Int[((d_.) + (e_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)
*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[2*c*d - b*e, 0] && IntegerQ[p] && (GtQ[p, 0]
|| EqQ[a, 0])

Rubi steps \begin{align*} \text {integral}& = \int \left (9 x-24 x^2+22 x^3-8 x^4+x^5\right ) \, dx \\ & = \frac {9 x^2}{2}-8 x^3+\frac {11 x^4}{2}-\frac {8 x^5}{5}+\frac {x^6}{6} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.00 \[ \int x \left (3-4 x+x^2\right )^2 \, dx=\frac {9 x^2}{2}-8 x^3+\frac {11 x^4}{2}-\frac {8 x^5}{5}+\frac {x^6}{6} \]

[In]

Integrate[x*(3 - 4*x + x^2)^2,x]

[Out]

(9*x^2)/2 - 8*x^3 + (11*x^4)/2 - (8*x^5)/5 + x^6/6

Maple [A] (verified)

Time = 10.64 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.76

method result size
gosper \(\frac {x^{2} \left (5 x^{4}-48 x^{3}+165 x^{2}-240 x +135\right )}{30}\) \(26\)
default \(\frac {9}{2} x^{2}-8 x^{3}+\frac {11}{2} x^{4}-\frac {8}{5} x^{5}+\frac {1}{6} x^{6}\) \(27\)
norman \(\frac {9}{2} x^{2}-8 x^{3}+\frac {11}{2} x^{4}-\frac {8}{5} x^{5}+\frac {1}{6} x^{6}\) \(27\)
risch \(\frac {9}{2} x^{2}-8 x^{3}+\frac {11}{2} x^{4}-\frac {8}{5} x^{5}+\frac {1}{6} x^{6}\) \(27\)
parallelrisch \(\frac {9}{2} x^{2}-8 x^{3}+\frac {11}{2} x^{4}-\frac {8}{5} x^{5}+\frac {1}{6} x^{6}\) \(27\)

[In]

int(x*(x^2-4*x+3)^2,x,method=_RETURNVERBOSE)

[Out]

1/30*x^2*(5*x^4-48*x^3+165*x^2-240*x+135)

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.76 \[ \int x \left (3-4 x+x^2\right )^2 \, dx=\frac {1}{6} \, x^{6} - \frac {8}{5} \, x^{5} + \frac {11}{2} \, x^{4} - 8 \, x^{3} + \frac {9}{2} \, x^{2} \]

[In]

integrate(x*(x^2-4*x+3)^2,x, algorithm="fricas")

[Out]

1/6*x^6 - 8/5*x^5 + 11/2*x^4 - 8*x^3 + 9/2*x^2

Sympy [A] (verification not implemented)

Time = 0.02 (sec) , antiderivative size = 29, normalized size of antiderivative = 0.85 \[ \int x \left (3-4 x+x^2\right )^2 \, dx=\frac {x^{6}}{6} - \frac {8 x^{5}}{5} + \frac {11 x^{4}}{2} - 8 x^{3} + \frac {9 x^{2}}{2} \]

[In]

integrate(x*(x**2-4*x+3)**2,x)

[Out]

x**6/6 - 8*x**5/5 + 11*x**4/2 - 8*x**3 + 9*x**2/2

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.76 \[ \int x \left (3-4 x+x^2\right )^2 \, dx=\frac {1}{6} \, x^{6} - \frac {8}{5} \, x^{5} + \frac {11}{2} \, x^{4} - 8 \, x^{3} + \frac {9}{2} \, x^{2} \]

[In]

integrate(x*(x^2-4*x+3)^2,x, algorithm="maxima")

[Out]

1/6*x^6 - 8/5*x^5 + 11/2*x^4 - 8*x^3 + 9/2*x^2

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.76 \[ \int x \left (3-4 x+x^2\right )^2 \, dx=\frac {1}{6} \, x^{6} - \frac {8}{5} \, x^{5} + \frac {11}{2} \, x^{4} - 8 \, x^{3} + \frac {9}{2} \, x^{2} \]

[In]

integrate(x*(x^2-4*x+3)^2,x, algorithm="giac")

[Out]

1/6*x^6 - 8/5*x^5 + 11/2*x^4 - 8*x^3 + 9/2*x^2

Mupad [B] (verification not implemented)

Time = 0.02 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.76 \[ \int x \left (3-4 x+x^2\right )^2 \, dx=\frac {x^6}{6}-\frac {8\,x^5}{5}+\frac {11\,x^4}{2}-8\,x^3+\frac {9\,x^2}{2} \]

[In]

int(x*(x^2 - 4*x + 3)^2,x)

[Out]

(9*x^2)/2 - 8*x^3 + (11*x^4)/2 - (8*x^5)/5 + x^6/6